package com.jinsilu.freight.http.request;

import com.hjq.http.annotation.HttpIgnore;
import com.hjq.http.config.IRequestApi;
import com.hjq.http.config.IRequestType;
import com.hjq.http.model.BodyType;

/**
 *    author : Android 轮子哥
 *    github : https://github.com/getActivity/AndroidProject
 *    time   : 2019/12/07
 *    desc   : 用户登录
 */
public final class LoginApi implements IRequestApi, IRequestType {

    @Override
    public String getApi() {
        return "api/login";
    }

    /** 手机号 */
    private String phone;
    /** 登录密码 */
    private String code;

//    private String clientId;
//    private String clientSecret;

    public LoginApi setPhone(String phone) {
        this.phone = phone;
        return this;
    }

    public LoginApi setCode(String code) {
        this.code = code;
        return this;
    }

    @HttpIgnore
    private String token;

    @Override
    public BodyType getType() {
        return BodyType.FORM;
    }

//    public LoginApi setClientId() {
//        this.clientId = "f8c75c59b9c311e9b0fb5254001c98eg";
//        return this;
//    }
//
//    public LoginApi setClientSecret() {
//        this.clientSecret = "cjtHnJdfEvUoAGSWW/AHjg==";
//        return this;
//    }
}